package com.exam.mapper;

import com.exam.domain.TeacherGrade;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by jly on 2017/3/20.
 */
public interface TeacherGradeMapper {
    /**
     * 查询需要判分的主观题
     *
     *@since 2017-3-20
     *@author jly
     * */
    List<TeacherGrade> queryteacherGrades();

    /**
     * 给questiongrade赋值
     *
     * @since 2017-3-20
     * @author jly
     * */
    boolean giveMarks(@Param("questiongrade") Integer questiongrade,
                      @Param("id") Integer id,
                      @Param("questionid") Integer questionid,
                      @Param("createtime") String createtime,
                      @Param("gradeid") Integer gradeid);

    /**
     * 根据gradeid查询相关信息集
     *
     * @since 2017-3-20
     * @author jly
     * */
    List<TeacherGrade> queryTeacherGradelist(@Param("gradeid") Integer gradeid);

    /**
     * 更新成绩表成绩
     *
     * @since 2017-3-20
     * @author jly
     * */
    boolean updataGrade(@Param("gradeid") Integer gradeid, @Param("sumgrade") int sumgrade,@Param("rank") int rank);

    /**
     * 根据gradeid删除老师判分表数据
     *
     * @since 2017-3-20
     * @author jly
     * */
    boolean delteachergrade(@Param("gradeid") Integer gradeid);
}
